import { defineStore } from 'pinia'
import defaultSettings from '@/settings'

export const useSettingsStore = defineStore('settings', {
  state: () => ({
    ...defaultSettings
  }),
  getters: {
    showSettings: (state) => state.showSettings,
    fixedHeader: (state) => state.fixedHeader,
    showLogo: (state) => state.showLogo,
    tagsView: (state) => state.tagsView
  },
  actions: {
    changeSetting({ key, value }: { key: string; value: any }) {
      if (key in this.$state) {
        this.$state[key] = value
      }
    }
  }
}) 